package com.borya.model.entity;

import java.io.File;

import com.borya.util.Constant;

public class FileInfo {
	private String relatePath;
	private String relateDir;//无文件名的相对路径
	private String parentPath;
	private String filePath;
	private String urlPath;
	private String fileName;
	public String getRelatePath() {
		return relatePath;
	}
	public String getFilePath() {
		return filePath;
	}
	public String getUrlPath() {
		return urlPath;
	}
	public String getFileName() {
		return fileName;
	}
	public String getParentPath() {
		return parentPath;
	}
	public String getRelateDir() {
		return relateDir;
	}
	public static FileInfo newInstance(String specialTag,String subPath,String fileName){
		FileInfo fileInfo = new FileInfo();
		fileInfo.fileName=fileName;
        fileInfo.relateDir = specialTag+"/"+subPath+"/";
//		fileInfo.relateDir = File.separator+specialTag+File.separator+subPath+File.separator;
		fileInfo.relatePath=fileInfo.relateDir+fileName;
		fileInfo.parentPath=Constant.IMG_SAVE_PATH+fileInfo.relateDir;// IMG_SAVE_PATH : D://
        fileInfo.filePath=Constant.IMG_SAVE_PATH+fileInfo.relatePath;
//		fileInfo.filePath=Constant.IMG_SAVE_PATH+File.separator+fileInfo.relatePath;
		fileInfo.urlPath=Constant.ums_url+fileInfo.relatePath;//https://km.m10027.com/ums
		return fileInfo;
	}
	
}
